{% extends 'starter.html' %}

{% block title %}
  <h1>
  课程记录展示
  {% load mytags %}


  </h1>
{% endblock %}

{% block content %}
  <a href="" class="btn btn-primary">
    添加课程记录
  </a>
  <div class="form-inline">

    <form action="" class="pull-right">
      <div class="form-group ">
        <select name="search_field" id="search_field" class="form-control">
          <option value="qq__contains">qq</option>
          <option value="name__contains">name</option>
          <!--  search_field:name  kw:1111  filter(name=1111) -->

        </select>
        <input type="text" class="form-control" id="key_word" placeholder="请输入搜索内容" name="kw">
        <button type="submit" class="btn btn-default">搜索</button>
      </div>

    </form>

  </div>
  <form action="" method="post">
      {% csrf_token %}
      <div class="form-group pull-left">
        <select name="action" id="action" class="form-control">

          <option value="">批量删除</option>



        </select>
      </div >
      <button class="btn btn-warning">go</button>
    <table class="table table-striped table-hover table-bordered"
  >
  <thead>
  <tr>
    <th><input type="checkbox" id="select_all">选择</th>
    <th>序号</th>
    <th>节次</th>
    <th>上课日期</th>
    <th>本节课程标题</th>
    <th>班级</th>
    <th>讲师</th>

    <th>操作</th>

  </tr>
  </thead>
  <tbody>
  {% for course_record in course_records %}
    <tr>
      <td>
        <input type="checkbox" name="cids" value="{{ course_record.pk }}">
      </td>
      <td>{{ forloop.counter }}</td>
      <td>{{ course_record.day_num }}</td>
      <td>{{ course_record.date|date:'Y-m-d' }}</td>
      <td>{{ course_record.course_title }}</td>
      <td>{{ course_record.re_class }}</td>
      <td>{{ course_record.teacher }}</td>

      <td>
{#        <a href="{% url 'edit_customer' customer_obj.pk %}?next=/customers/?page=3"><i class="fa fa-edit"></i></a>#}
        <a href=""><i class="fa fa-edit"></i></a>
      </td>

    </tr>
  {% endfor %}

  </tbody>
  </table>

    {{ page_html }}
  </form>
{#  {{ page_html|safe }}#}


{#  <nav aria-label="Page navigation">#}
{#    <ul class="pagination">#}
{#      <li>#}
{#        <a href="#" aria-label="Previous">#}
{#          <span aria-hidden="true">&laquo;</span>#}
{#        </a>#}
{#      </li>#}
{#      {% for i in page_num_range %}#}
{#        <li><a href="/customers/?page={{ i }}">{{ i }}</a></li>#}
{#      {% endfor %}#}
{##}
{#      <li>#}
{#        <a href="#" aria-label="Next">#}
{#          <span aria-hidden="true">&raquo;</span>#}
{#        </a>#}
{#      </li>#}
{#    </ul>#}
{#  </nav>#}

{% endblock %}






